
#include "S_4_Environment_doChange.h"
#include "property_decoder.h"
#include "spec.h"
 

void P_4_7_Temperature_doChange(float newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_float(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_FLOAT;
	thiz.data.number.value.floatValue = newValue;
#endif	
	
	if (send_property_changed(4, 7, &thiz) != MIIO_OK)
    {
       LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_4_9_RelativeHumidity_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(4, 9, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

